From c88dca2ad08ac83b3d350ea8a4df1d6ee41f0f2e Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Wed, 6 Apr 2022 01:02:44 +0200
Subject: [PATCH 18/19] lldb: cross-compiling workarounds for python

---
 lldb/CMakeLists.txt | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git lldb/CMakeLists.txt lldb/CMakeLists.txt
index edb4c513a..acf682f3d 100644
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -46,20 +46,15 @@ if (LLDB_ENABLE_PYTHON)
     "Filename extension for native code python modules")
 
   foreach(var LLDB_PYTHON_RELATIVE_PATH LLDB_PYTHON_EXE_RELATIVE_PATH LLDB_PYTHON_EXT_SUFFIX)
-    if(NOT DEFINED ${var} AND NOT CMAKE_CROSSCOMPILING)
+    if(NOT DEFINED ${var})
       execute_process(
-        COMMAND ${Python3_EXECUTABLE}
+        COMMAND python3
           ${CMAKE_CURRENT_SOURCE_DIR}/bindings/python/get-python-config.py
           ${var}
         OUTPUT_VARIABLE value
         OUTPUT_STRIP_TRAILING_WHITESPACE)
       file(TO_CMAKE_PATH "${value}" value)
       set(${var} ${value} CACHE STRING ${cachestring_${var}})
-    else()
-      if ("${${var}}" STREQUAL "")
-        message(FATAL_ERROR
-          "Crosscompiling LLDB with Python requires manually setting ${var}.")
-      endif()
     endif()
   endforeach()
 endif ()
-- 
2.37.3

